package com.nf.ch03.test02.entity;

/**
 * @author lwj
 * @date 2025-03-03
 * @vesion 1.0.0
 */
public class Animal {
    /**
     * 姓名
     */
    private String name;

    // 构造方法
    public Animal() {
    }

    public Animal(String name) {
        this.name = name;
    }

    // 属性
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void eat(){

    }
    public void sleep(){

    }

    // 打印动物信息
    @Override
    public String toString() {
        return "Animal{" +
                "name='" + name + '\'' +
                '}';
    }
}
